package com.zmn.plat.services.interfaces.standard.read.permission;

import java.util.List;

import com.zmn.plat.model.entity.standard.read.permission.OrgPermitTreeVO;
import com.zmn.plat.model.entity.standard.read.permission.StandardReadPermission;
import com.zmn.plat.model.entity.standard.read.permission.StandardReadPermissionQuery;

/**
 * 标准列表阅读权限
 *
 * @author linfeng
 *
 * @since 2020-02-12 10:23:38
 */
public interface StandardReadPermissionService {
    /**
     * 根据主键查询
     * 
     * @param id
     *            ID
     * @return
     */
    StandardReadPermission findByKey(Integer id);

    /**
     * 查询部门阅读权限树VO
     *
     * @param standardId
     * @return
     */
    List<OrgPermitTreeVO> listOrgPermitTreeVOByStandardId(Integer standardId);

    /**
     * 分页搜索
     * 
     * @param query
     *            条件
     * @return 列表
     */
    List<StandardReadPermission> listPageByQuery(StandardReadPermissionQuery query);

    /**
     * 搜索
     * 
     * @param query
     *            条件
     * @return
     */
    List<StandardReadPermission> listByQuery(StandardReadPermissionQuery query);

    /**
     * 所有数据
     * 
     * @return
     */
    List<StandardReadPermission> listAll();

    /**
     * 统计
     * 
     * @param query
     *            条件
     * @return
     */
    Integer countByQuery(StandardReadPermissionQuery query);

    /**
     * 更新
     * 
     * @param standardReadPermission
     * @return
     */
    Integer updateByKey(StandardReadPermission standardReadPermission);

    /**
     * 插入
     * 
     * @param standardReadPermission
     * @return
     */
    Integer insert(StandardReadPermission standardReadPermission);

    /**
     * 批量插入
     * 
     * @param standardReadPermissions
     * @return
     */
    Integer insertBatch(List<StandardReadPermission> standardReadPermissions);

    /**
     * 删除
     * 
     * @param id
     *            ID
     * @return
     */
    Integer deleteByKey(Integer id);

    /**
     * 根据标准ID删除
     * 
     * @param standardId
     *            标准ID
     * @return
     */
    Integer deleteByStandardId(Integer standardId);
}
